<%--
  Created by IntelliJ IDEA.
  User: Chuch
  Date: 2017/5/3
  Time: 20:26
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../common/taglibs.jsp" %>
<html>
<head>
    <title>绑卡失败情况查询</title>
    <script src="${ctx}/js/views/payCount/agreementFailReport.js"></script>
</head>
<body ng-app="myApp" style="overflow:scroll;overflow-x:hidden">
<core:import url="../common/pageHead.jsp">
    <core:param name="title" value="绑卡失败情况查询"/>
</core:import>
<div ng-controller="queryCtrl" class="container-fluid">
    <form id="queryForm" name="queryForm" action="${ctx}/cif/agreementFailReport/search" autocomplete="off" role="form">
        <table class="table table-bordered table-condensed">
            <tr>
                <td class="text-right">申请时间</td>
                <td>
                    <input type="text" class="{{vm.constant.inputClass}}" uib-datepicker-popup
                        ng-blur="vm.checkStartDay(vm.queryBean.startTime,vm.queryBean.endTime)"
                        ng-model="vm.queryBean.startTime" required/>
                    -
                    <input type="text" class="{{vm.constant.inputClass}}" uib-datepicker-popup
                        ng-blur="vm.checkEndDay(vm.queryBean.startTime,vm.queryBean.endTime)"
                        ng-model="vm.queryBean.endTime" required/>
                </td>
            </tr>
            <tr align="center">
                <td colspan="6">
                    <button type="button" ng-click="vm.queryDetail()" class="btn btn-default">
                        查询
                    </button>
                    <button type="button" ng-click="vm.resetForm()" class="btn btn-default">重置</button>
                    <shiro:hasPermission name="refund-report_download">
                        <button down-file="${ctx}/cif/agreementFailReport/download" params="vm.queryBean"
                                down-file-type="xls" class="btn btn-default" down-cfg="vm.downCfg">
                            下载
                        </button>
                    </shiro:hasPermission>
                </td>
            </tr>
        </table>
    </form>

    <div>
        <table table-detail>
            <thead>
            <tr>
                <th>序号</th>
                <th>申请开始日期</th>
                <th>申请结束日期</th>
                <th>类型</th>
                <th>失败原因</th>
                <th>数量</th>
                <th>占比</th>
                <th>失败明细</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="bean in vm.pagination.list track by $index">
                <td>{{$index+1}}</td>
                <td>{{bean.startTime}}</td>
                <td>{{bean.endTime}}</td>
                <td>{{bean.failType}}</td>
                <td>{{bean.failReason}}</td>
                <td>{{bean.total}}</td>
                <td>{{bean.failReasonRate}}</td>
                <td>
                    <button type="button"  ng-click= "vm.show(bean)" style="background:paleturquoise;">查看失败明细</button>
                </td>
            </tr>
            </tbody>
            <tr>
                <td></td><td></td><td></td><td></td>
                <td>总计</td>
                <td>{{vm.totalCount}}</td>
                <td></td><td></td>
            </tr>
        </table>
        <core:import url="../common/pageFoot.jsp"/>
    </div>
    <core:import url="../common/nav.jsp"/>
</div>
</body>
</html>
